package com.kayt.cyberBar.system.business.entity.po;

import com.kayt.cyberBar.common.base.BaseEntity;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 *
 * @author Kevin
 * @since 12/27/2017 16:35
 */
@Entity
@Table(name = "s_system_menu")
@NamedQuery(name = "SSystemMenu.findAll", query = "SELECT b FROM SSystemMenu b")
public class SSystemMenu extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 3351641132949255429L;
	private Long id;
	private String name;
	private String code;
	private String parentCode;
	private String levelCode;
	private String uri;
	private String pic_url;
	private String type;
	private String description;
	private Date createTime;
	private Date updateTime;
	private String urlId;
	private String urlType;
	private String operatorAccount;
	private String status;

	private List<SSystemCompetence> competences;

	// @ManyToMany
	// @JoinTable(
	// name = "s_system_menu_competence",
	// inverseJoinColumns =
	// {@JoinColumn(name="d_competence_code",referencedColumnName = "d_code")},
	// joinColumns = {@JoinColumn(name = "d_menu_code",referencedColumnName =
	// "d_code")}
	// )
	@Transient
	public List<SSystemCompetence> getCompetences() {
		return competences;
	}

	public void setCompetences(List<SSystemCompetence> competences) {
		this.competences = competences;
	}

	@Column(name = "d_status_code")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "d_id")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "d_pic_url")
	public String getPic_url() {
		return pic_url;
	}

	public void setPic_url(String pic_url) {
		this.pic_url = pic_url;
	}

	@Column(name = "d_parent_code")
	public String getParentCode() {
		return parentCode;
	}

	public void setParentCode(String parentCode) {
		this.parentCode = parentCode;
	}

	@Column(name = "d_url_id")
	public String getUrlId() {
		return urlId;
	}

	public void setUrlId(String urlId) {
		this.urlId = urlId;
	}

	@Column(name = "d_url_type")
	public String getUrlType() {
		return urlType;
	}

	public void setUrlType(String urlType) {
		this.urlType = urlType;
	}

	@Column(name = "d_name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "d_code")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "d_level_code")
	public String getLevelCode() {
		return levelCode;
	}

	public void setLevelCode(String levelCode) {
		this.levelCode = levelCode;
	}

	@Column(name = "d_uri")
	public String getUri() {
		return uri;
	}

	public void setUri(String uri) {
		this.uri = uri;
	}

	@Column(name = "d_type")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "d_description")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "d_create_time")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "d_update_time")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "d_operator_account")
	public String getOperatorAccount() {
		return operatorAccount;
	}

	public void setOperatorAccount(String operatorAccount) {
		this.operatorAccount = operatorAccount;
	}
}
